<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template priority_queue</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../heap/reference.html#doxygen.priority__queue_8hpp" title="Header &lt;boost/heap/priority_queue.hpp&gt;">
<link rel="prev" href="structboost_1_1heap_1_1store__parent__pointer.html" title="Struct template store_parent_pointer">
<link rel="next" href="classboost_1_1heap_1_1skew__heap.html" title="Class template skew_heap">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1heap_1_1store__parent__pointer.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap/reference.html#doxygen.priority__queue_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1heap_1_1skew__heap.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.classboost_1_1heap_1_1priority__queue"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template priority_queue</span></h2>
<p>boost::heap::priority_queue — priority queue, based on stl heap functions </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../heap/reference.html#doxygen.priority__queue_8hpp" title="Header &lt;boost/heap/priority_queue.hpp&gt;">boost/heap/priority_queue.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">class</span><span class="special">...</span> Options<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queuetypes">types</a></span>
  <span class="keyword">typedef</span> <span class="identifier">T</span>                                       <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a68a17b6d07988e20f26de9f9ffa026ce"></a><span class="identifier">value_type</span><span class="special">;</span>     
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">size_type</span>       <a name="doxygen.classboost_1_1heap_1_1priority__queue_1aebcc00a83592d270dcfc25ec1aa7f02e"></a><span class="identifier">size_type</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">difference_type</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a9f6e5136d911912f4ce9086c03bf8c8c"></a><span class="identifier">difference_type</span><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">value_compare</span>   <a name="doxygen.classboost_1_1heap_1_1priority__queue_1ac3fee27f418acbda86c5f0cbc7067fb4"></a><span class="identifier">value_compare</span><span class="special">;</span>  
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">allocator_type</span>  <a name="doxygen.classboost_1_1heap_1_1priority__queue_1ad9670d349fff1f8eef97cc536f333082"></a><span class="identifier">allocator_type</span><span class="special">;</span> 
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">reference</span>       <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a0b74bb500e64d91147f0ecc2699ea6a5"></a><span class="identifier">reference</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">const_reference</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1afcf2b30b9c8362f7fbab0c71cd85589d"></a><span class="identifier">const_reference</span><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">pointer</span>         <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a90bb9cf7fac5698573a201e43f065d7b"></a><span class="identifier">pointer</span><span class="special">;</span>        
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">const_pointer</span>   <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a0fcd935edb2c862501f5e326a294d453"></a><span class="identifier">const_pointer</span><span class="special">;</span>  
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">iterator</span>        <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a20ce2e7fa828e0b686498088f1d01c69"><span class="identifier">iterator</span></a><span class="special">;</span>       
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">const_iterator</span>  <a name="doxygen.classboost_1_1heap_1_1priority__queue_1acaac038b943eb9729bdf76e4dd65892e"></a><span class="identifier">const_iterator</span><span class="special">;</span> 

  <span class="comment">// <a class="link" href="classboost_1_1heap_1_1priority__queue.html#id-1_3_15_6_8_1_1_1_20-bb">public member functions</a></span>
  <span class="keyword">explicit</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1abe3beb3d489d39ebf0fbc9260d5c41c4"><span class="identifier">priority_queue</span></a><span class="special">(</span><span class="identifier">value_compare</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">value_compare</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a3842e04bf95e261260aa3dedc5ce019e"><span class="identifier">priority_queue</span></a><span class="special">(</span><span class="identifier">allocator_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a62f46d7cc19d697e808e6efc6c4e5e28"><span class="identifier">priority_queue</span></a><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a69c9996f8ef155dfb021e3f7b97c9e6e"><span class="identifier">priority_queue</span></a><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1ad786cc1c619d4b9aadd26e257a74ab19"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1ae5554e7af33d842d33c1739e76461f17"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a1ead627e71be721c89cc5670c0ba7bb2"><span class="identifier">empty</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1abc94615ad576b3c99aa26043a5459db4"><span class="identifier">size</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a7dfbcacce4e4d24344d570460bdf9c66"><span class="identifier">max_size</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a06a1f6b714db6c2e7d2d788a7b3166d1"><span class="identifier">clear</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">allocator_type</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a11f7330460490930c557ce84df029615"><span class="identifier">get_allocator</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">const_reference</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a5855c7b3f23da91e57a5baf9f76548a7"><span class="identifier">top</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a78f740a0544f237b16766ed75e89f88d"><span class="identifier">push</span></a><span class="special">(</span><span class="identifier">value_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span><span class="special">...</span> Args<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a82aec034403c15b5b796e148e321e347"><span class="identifier">emplace</span></a><span class="special">(</span><span class="identifier">Args</span> <span class="special">&amp;&amp;</span><span class="special">...</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a81af62c9bb0165757ba2d050eea43e77"><span class="identifier">pop</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1aa00d3c98a039dd0ae9e36d86763579f0"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1ad770cb9d1e64e95139ab09817d74987a"><span class="identifier">begin</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1abb60431bbb5567fc1e10bd1d352806ef"><span class="identifier">end</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1ab1c641c1afc929f259b8dd826043b044"><span class="identifier">reserve</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">value_compare</span> <span class="keyword">const</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a6203e045ac596b508be7b62929cb396a"><span class="identifier">value_comp</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a5e545de2b14d0e99c565eac348b84a91"><span class="keyword">operator</span><span class="special">&lt;</span></a><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a5254217a8e8763ceba45d48ce9bea95a"><span class="keyword">operator</span><span class="special">&gt;</span></a><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1affa6ff6050324a406dbc9b091d885113"><span class="keyword">operator</span><span class="special">&gt;=</span></a><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a74cea358167795d48b8d42649a2b3086"><span class="keyword">operator</span><span class="special">&lt;=</span></a><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a646cf066ee065361ce415b5123b34724"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1heap_1_1priority__queue.html#doxygen.classboost_1_1heap_1_1priority__queue_1a7c03677f0fa76b5a53130de077f05821"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// public data members</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">constant_time_size</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_ordered_iterators</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_mergable</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_stable</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_reserve</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.15.6.9.3.4"></a><h2>Description</h2>
<p>The <a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> class is a wrapper for the stl heap functions.<br>
 The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</p>
<p>The container supports the following options:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><code class="computeroutput">boost::heap::compare&lt;&gt;</code>, defaults to <code class="computeroutput">compare&lt;std::less&lt;T&gt;</code> &gt;</p></li>
<li class="listitem"><p><code class="computeroutput">boost::heap::stable&lt;&gt;</code>, defaults to <code class="computeroutput">stable&lt;false&gt;</code> </p></li>
<li class="listitem"><p><code class="computeroutput">boost::heap::stability_counter_type&lt;&gt;</code>, defaults to <code class="computeroutput">stability_counter_type&lt;boost::uintmax_t&gt;</code> </p></li>
<li class="listitem"><p><code class="computeroutput">boost::heap::allocator&lt;&gt;</code>, defaults to <code class="computeroutput">allocator&lt;std::allocator&lt;T&gt;</code> &gt; </p></li>
</ul></div>
<p>
</p>
<div class="refsect2">
<a name="id-1.3.15.6.9.3.4.4"></a><h3>
<a name="doxygen.classboost_1_1heap_1_1priority__queuetypes"></a><code class="computeroutput">priority_queue</code> 
        public
       types</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="identifier">implementation_defined</span><span class="special">::</span><span class="identifier">iterator</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a20ce2e7fa828e0b686498088f1d01c69"></a><span class="identifier">iterator</span><span class="special">;</span></p>
<p><span class="bold"><strong>Note:</strong></span> The iterator does not traverse the priority queue in order of the priorities. </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.15.6.9.3.4.5"></a><h3>
<a name="id-1_3_15_6_8_1_1_1_20-bb"></a><code class="computeroutput">priority_queue</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1abe3beb3d489d39ebf0fbc9260d5c41c4"></a><span class="identifier">priority_queue</span><span class="special">(</span><span class="identifier">value_compare</span> <span class="keyword">const</span> <span class="special">&amp;</span> cmp <span class="special">=</span> <span class="identifier">value_compare</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> constructs an empty priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a3842e04bf95e261260aa3dedc5ce019e"></a><span class="identifier">priority_queue</span><span class="special">(</span><span class="identifier">allocator_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> alloc<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> constructs an empty priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.classboost_1_1heap_1_1priority__queue_1a62f46d7cc19d697e808e6efc6c4e5e28"></a><span class="identifier">priority_queue</span><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> copy-constructs priority queue from rhs.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Linear. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.classboost_1_1heap_1_1priority__queue_1a69c9996f8ef155dfb021e3f7b97c9e6e"></a><span class="identifier">priority_queue</span><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> C++11-style move constructor.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1ad786cc1c619d4b9aadd26e257a74ab19"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> C++11-style move assignment.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1ae5554e7af33d842d33c1739e76461f17"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Assigns priority queue from rhs.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Linear. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a1ead627e71be721c89cc5670c0ba7bb2"></a><span class="identifier">empty</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Returns true, if the priority queue contains no elements.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1abc94615ad576b3c99aa26043a5459db4"></a><span class="identifier">size</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Returns the number of elements contained in the priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a7dfbcacce4e4d24344d570460bdf9c66"></a><span class="identifier">max_size</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Returns the maximum number of elements the priority queue can contain.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a06a1f6b714db6c2e7d2d788a7b3166d1"></a><span class="identifier">clear</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Removes all elements from the priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Linear. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">allocator_type</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a11f7330460490930c557ce84df029615"></a><span class="identifier">get_allocator</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Returns allocator.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">const_reference</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a5855c7b3f23da91e57a5baf9f76548a7"></a><span class="identifier">top</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Returns a const_reference to the maximum element.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a78f740a0544f237b16766ed75e89f88d"></a><span class="identifier">push</span><span class="special">(</span><span class="identifier">value_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> v<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Adds a new element to the priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Logarithmic (amortized). Linear (worst case). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span><span class="special">...</span> Args<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a82aec034403c15b5b796e148e321e347"></a><span class="identifier">emplace</span><span class="special">(</span><span class="identifier">Args</span> <span class="special">&amp;&amp;</span><span class="special">...</span> args<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Adds a new element to the priority queue. The element is directly constructed in-place.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Logarithmic (amortized). Linear (worst case). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a81af62c9bb0165757ba2d050eea43e77"></a><span class="identifier">pop</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Removes the top element from the priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Logarithmic (amortized). Linear (worst case). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1aa00d3c98a039dd0ae9e36d86763579f0"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="classboost_1_1heap_1_1priority__queue.html" title="Class template priority_queue">priority_queue</a> <span class="special">&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Swaps two priority queues.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1ad770cb9d1e64e95139ab09817d74987a"></a><span class="identifier">begin</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Returns an iterator to the first element contained in the priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1abb60431bbb5567fc1e10bd1d352806ef"></a><span class="identifier">end</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Returns an iterator to the end of the priority queue.</p>
<p><span class="bold"><strong>Complexity:</strong></span> Constant. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1ab1c641c1afc929f259b8dd826043b044"></a><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">size_type</span> element_count<span class="special">)</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects:</strong></span> Reserves memory for element_count elements</p>
<p><span class="bold"><strong>Complexity:</strong></span> Linear.</p>
<p><span class="bold"><strong>Node:</strong></span> Invalidates iterators </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">value_compare</span> <span class="keyword">const</span> <span class="special">&amp;</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a6203e045ac596b508be7b62929cb396a"></a><span class="identifier">value_comp</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effect:</strong></span> Returns the value_compare object used by the priority queue </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a5e545de2b14d0e99c565eac348b84a91"></a><span class="keyword">operator</span><span class="special">&lt;</span><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Returns:</strong></span> Element-wise comparison of heap data structures</p>
<p><span class="bold"><strong>Requirement:</strong></span> the <code class="computeroutput">value_compare</code> object of both heaps must match. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a5254217a8e8763ceba45d48ce9bea95a"></a><span class="keyword">operator</span><span class="special">&gt;</span><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Returns:</strong></span> Element-wise comparison of heap data structures</p>
<p><span class="bold"><strong>Requirement:</strong></span> the <code class="computeroutput">value_compare</code> object of both heaps must match. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1affa6ff6050324a406dbc9b091d885113"></a><span class="keyword">operator</span><span class="special">&gt;=</span><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Returns:</strong></span> Element-wise comparison of heap data structures</p>
<p><span class="bold"><strong>Requirement:</strong></span> the <code class="computeroutput">value_compare</code> object of both heaps must match. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a74cea358167795d48b8d42649a2b3086"></a><span class="keyword">operator</span><span class="special">&lt;=</span><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Returns:</strong></span> Element-wise comparison of heap data structures</p>
<p><span class="bold"><strong>Requirement:</strong></span> the <code class="computeroutput">value_compare</code> object of both heaps must match. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a646cf066ee065361ce415b5123b34724"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Equivalent comparison <span class="bold"><strong>Returns:</strong></span> True, if both heap data structures are equivalent. <p><span class="bold"><strong>Requirement:</strong></span> the <code class="computeroutput">value_compare</code> object of both heaps must match. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> HeapType<span class="special">&gt;</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1heap_1_1priority__queue_1a7c03677f0fa76b5a53130de077f05821"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="identifier">HeapType</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Equivalent comparison <span class="bold"><strong>Returns:</strong></span> True, if both heap data structures are not equivalent. <p><span class="bold"><strong>Requirement:</strong></span> the <code class="computeroutput">value_compare</code> object of both heaps must match. </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2010, 2011 Tim Blechmann<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1heap_1_1store__parent__pointer.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap/reference.html#doxygen.priority__queue_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1heap_1_1skew__heap.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
